#pragma once

#include "datapacket.h"
#include "timeslot.h"
#include "Parser.h"

class CMediaSource
{
public:
    CMediaSource( CString );
    virtual ~CMediaSource(void);

protected:
    CString     filename ;

public :
    virtual BOOL	    Initialize() = 0;
    virtual CString     GetSDP() = 0;
    virtual CTimeSlot * GetTimeSlot( DWORD ) = 0 ;
    virtual DWORD       GetDuration() = 0;

    virtual SLOT_TABLE*	GetLengthTable() = 0;
    virtual DWORD	    GetSecondNum() = 0;

    //virtual DWORD *     GetKeyFrames() = 0;
    //virtual DWORD       GetKeyFrmCount() = 0;

	//add by bound 2006-7-18 16:21:24
	virtual DWORD			GetNumOfIndex() = 0;

	virtual WORD			GetAudioNumber() = 0;
	virtual WORD			GetVideoNumber() = 0;

	virtual DWORD			GetAudioBitrate() = 0;
	virtual DWORD			GetVideoBitrate() = 0;
	virtual DWORD			GetBitrate() = 0;

	//add by bound 2006-7-31 11:41:07
	virtual	Int32	SeekBySliceNum(UInt32& nSliceNum)=0;
	virtual	CTimeSlot* ReadTimeSlotByDuration(UInt32 nSliceNum,UInt32 nBeginStamp,UInt32 nEndStamp)=0;
	virtual	CTimeSlot* GetTimeSlotByDuration(UInt32 nSliceNum,UInt32 nBeginStamp,UInt32 nEndStamp)=0;
};
